![S100 Computers](../../Header/S100_Banner.jpg)
ALTAIR.COM
In much of my development work for building CPM programs for my S-100 system I
actually build, edit, assemble and sometimes even execute the program first on
an IBM PC using Windows XP or Windows 7. One day I hope to have an
S-100 video board of the resolution that current PC video boards have but for
now nothing compares with the editing convenience of Microsoft's Visual Studio
when working with .Z80 or .ASM files.
While you can edit the programs under windows (Visual Studio), you need a "CPM
emulator" to assemble them and/or execute them. There are a few good CPM
emulators for the PC available. I like to work with Peter Schorn's
AltairZ80 Simulator. He has put an enormous amount of work into building a
Windows based program that behaves as if your PC was a S-100 Altair computer.
Start with this documentation
for some background information. However to assemble and run your own CPM
programs you only need to launch the CPM3 emulator within the core Altair.com program
itself. From then on (transparent to you) you are operating under CPM3 in a
Windows box.
Here is what you must do:-
You can download Peter's must current version of the simulator (SIMH) as a
.zip file from here.
That site has an enormous amount of information. Alternatively I selected just
enough to get you a functional system to allow you to run CPM3 to assemble/run
.z80 or .asm programs under the simulator quickly. The process may seem a
little complex/convoluted at first, but you will soon find yourself using it all
the time. A step by step process...
Bring up windows and open your "Windows Explorer" program. Download the
following .zip file Core SIMH
Files.zip
Create a new folder, lets call it "Altair". Into that folder extract and place
all the compressed files from the above Core SIMH Files.zip file.
You should have:-
altair80.exe 599K
app.dsk 1088K
cpm3 1K
cpm3.dsk 1088K
idsk
8192K
Double click on altair80.exe to launch the program. This will create
a SIMH specific DOS box window. At the "A>" prompt within that window type:-
do cpm3
After the carriage return you will see a completely self contained and
functional CPM3 system. The box will look like this:-
![Altair Signon](Altair Signon.jpg)
The simulator behaves like a ~50MHz Z80 driven system. For example
to see the user 0 directory type:-
DIR
You will see the normal CPM3 directory listing, something like this:-
![DIR listing](Dir Listing.jpg)
You can read up on CPM3 to run many of these programs. Other "well known"
programs have been added as well. They are marked as CPM3 "System files" so they
can be run from any drive and user group.
For our needs however we will take advantage of the fact that the simulator has
an large (empty) memory disk "I:" drive that we will normally use as our work
disk. So typing "I:" CR will bring you to that
drive.
Now we need some way of getting the windows based files into and out of this CPM
simulator box. The program R.COM and
W.COM (both system files on A>) allow you to do
this. Suppose you have a file, say MASTER.Z80,
which you have written in your windows "Altair" folder to get it into the CPM3
simulator I: drive at the I> prompt you type:-
r master.z80
and after the CR, the file is sucked on to the CPM3 I: drive. There you
can do anything you like with it under CPM3. Usually that involves assembling
and linking it with CPM3 software. When you are done, you write the
resulting file (.HEX, .COM etc.) back to the Windows Altair folder at the I>
prompt with:-
w master.hex
Now usually you will find yourself doing the same thing over and over
again as you debug your program. This is where we take advantages of CPM's
submit file capability. In the above example I have the following
master.sub file on the CPM3 I: disk:-
r master.z80
z80asm master FH
w master.hex
w master.lst
so if I type:-
submit master
I end up with a fully assembled master.hex file in the windows Altair folder
ready for testing or EPROM burning. The whole process becomes very
automatic. You edit your .z80 or .asm code with Visual Studio (or your favorite
editor) save the new version to disk, go to the above CPM3 box type,
submit master and essentially instantly you have
back the .hex file in your windows folder. Here is an example output:-
![SLR Example](SLR Example.jpg)
If there are assembly errors they will be listed. Once you have your
program is "hammered into shape" you can then upload it to your S-100 machine
using a modem program such as described
here. The whole
process works very smoothly mainly because the editing and assembly is so fast
with modern PC machines. Here is a typical working example screen picture:-
![Running Example](Running Example.jpg)
One further nice thing about this arrangement is if you close everything and
save your whole Altair folder of contents, the next time you re-launch
Altair.com it will start up where you left off. Nothing is lost.
Whatever windows folder Altair.com is launched from -- that is the folder
the above "w.com" and "r.com" commands work with. You can even have multiple
CPM3 boxes present and operating at the same time.
This page was last modified
on
03/06/2011